﻿-- Define the relationship between BusinessRole and Model
ALTER TABLE [dbo].[BusinessRole] WITH CHECK ADD  
       CONSTRAINT [FK_BusinessRole_Model] FOREIGN KEY([Model])
REFERENCES [dbo].[Model] ([ModelId])
ON DELETE NO ACTION
GO
-- Define the relationship between BusinessRole and Person
ALTER TABLE [dbo].[BusinessRole] WITH CHECK ADD  
       CONSTRAINT [FK_BusinessRole_CreatedByPerson] FOREIGN KEY([CreatedBy])
REFERENCES [dbo].[Person] ([PersonId])
ON DELETE NO ACTION
GO
-- Define the relationship between BusinessRole and Person
ALTER TABLE [dbo].[BusinessRole] WITH CHECK ADD  
       CONSTRAINT [FK_BusinessRole_LastChangedBy] FOREIGN KEY([LastChangedBy])
REFERENCES [dbo].[Person] ([PersonId])
ON DELETE NO ACTION
GO